From 10055f661eee96383cd302c6177bd7068e9a00bd Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Mon, 6 Jun 2016 11:52:12 +0100 Subject: [PATCH] libxl: log file name in failure in libxl__create_qemu_logfile Signed-off-by: Wei Liu Acked-by: Ian Jackson --- tools/libxl/libxl_dm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 6ff05c315f..de16a5912f 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -52,13 +52,15 @@ static int libxl__create_qemu_logfile(libxl__gc *gc, char *name) if (rc) return rc; logfile_w = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0644); - free(logfile); if (logfile_w < 0) { - LOGE(ERROR, "unable to open Qemu logfile"); + LOGE(ERROR, "unable to open Qemu logfile: %s", logfile); + free(logfile); return ERROR_FAIL; } + free(logfile); + return logfile_w; } -- 2.30.2